#define  _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
int fun(int x, int y)
{
    if (x == y || y == 1)
        return 1;
    else
        return fun(x - 1, y - 1) + fun(x - 1, y);
}
int main()
{
    int i = 0, j = 0, k = 0;
    int n = 0;
    scanf("%d", &n);
    for (i = 1; i <= n + 1; i++)
    {
        for (j = i; j < n + 1; j++)
            printf("   ");
        for (k = 1; k <= i; k++)
            printf("%3d   ", fun(i, k));
        printf("\n");
    }
    return 0;
}